<div class="fsh-pop">
    <div id="add_form" class="layui-form">
        <input type="hidden" name="permission_id" lay-verify="required" value="<%=permission_id%>">
        <input type="hidden" name="createUserId" id="createUserId" value="<%=createUserId%>" />
        <input type="hidden" name="createDate" id="createDate" value="<%=createDate%>" />
        <input type="hidden" name="updateUserId" id="updateUserId" value="<%=updateUserId%>" />
        <input type="hidden" name="updateDate" id="updateDate" value="<%=updateDate%>" />
         <input type="hidden" name="menu_flag" id="menu_flag" value="<%=menu_flag%>" />
         <input type="hidden" name="status" id="status" value="<%=status%>" />
         <input type="hidden" name="blank_flag" id="blank_flag" value="<%=blank_flag%>" />
         
        <div class="layui-form-item">
            <label class="layui-form-label"><i>*</i>名称</label>
            <div class="layui-input-block">
                <input type="text" name="permissionName" lay-verify="required" placeholder="请输入内容" class="layui-input"
                    value="<%=permissionName%>">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>菜单编号</label>
            <div class="layui-input-block">
                <input name="permissionKey" lay-verify="required" placeholder="请输入内容" class="layui-input"
                    value="<%=permissionKey%>">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>父级菜单</label>
            <div class="layui-input-block">
                  <input   name="parent_key" lay-verify="required" autocomplete="off" placeholder="请选择父级菜单" class="layui-input" id="parent_key" value="<%=parent_key%>">
                    <input  type="hidden" name="parent_keys"  id="parent_keys">
                <!-- <input name="parent_name" maxlength="20" lay-verify="required" autocomplete="off" placeholder="请选择父级菜单" class="layui-input" id="parent_name" value="<%=parent%>"> -->
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label"><i>*</i>请求地址</label>
            <div class="layui-input-block">
                <input name="url" lay-verify="required" placeholder="请输入内容" class="layui-input" value="<%=url%>">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">排序</label>
            <div class="layui-input-block">
                <input name="sort"  placeholder="请输入内容" class="layui-input" value="<%=sort%>">
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">请求方式</label>
            <div class="layui-input-block">
                <input name="method"  placeholder="请输入内容" class="layui-input" value="<%=method%>">
            </div>
        </div>

    </div>
</div>

<script>
 
    $("#parent_key").click(function () {
        showDialog({
            title: '选择父级菜单'
            , template: 'views/system/menu/template/menu.html'
            , width: 400
            , height: 600
            , yes: function (index, layero) {
                layer.close(index);
                  var res = callbackdata(); 
                    layer.close(index);
                    $("#parent_key_name").val(res.title);
                    $("#parent_key").val(res.key);
                    $("#parent_keys").val(res.keys);
            }

        });

    });
</script>